// package com.test.web.excel.handler;
//
// import com.alibaba.excel.write.handler.SheetWriteHandler;
// import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
// import com.alibaba.excel.write.metadata.holder.WriteWorkbookHolder;
// import lombok.extern.slf4j.Slf4j;
// import org.apache.poi.ss.usermodel.DataValidation;
// import org.apache.poi.ss.usermodel.DataValidationConstraint;
// import org.apache.poi.ss.usermodel.DataValidationHelper;
// import org.apache.poi.ss.util.CellRangeAddressList;
// /**
//  * @author heyanjing
//  * date:2020-06-06 2020/6/6:18:52
//  */
// @Slf4j
// public class DefaultSheetWriteHandler implements SheetWriteHandler {
//
//     @Override
//     public void beforeSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {
//
//     }
//
//     @Override
//     public void afterSheetCreate(WriteWorkbookHolder writeWorkbookHolder, WriteSheetHolder writeSheetHolder) {
//         //给指定的行列加上数据
//         CellRangeAddressList cellRangeAddressList = new CellRangeAddressList(1, 1, 0, 0);
//         DataValidationHelper helper = writeSheetHolder.getSheet().getDataValidationHelper();
//         DataValidationConstraint constraint = helper.createExplicitListConstraint(new String[]{"DefaultSheetWriteHandler.afterSheetCreate加的数据"});
//         DataValidation dataValidation = helper.createValidation(constraint, cellRangeAddressList);
//         writeSheetHolder.getSheet().addValidationData(dataValidation);
//     }
//
// }
